# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=go-pkac
_pkgname=pkac
_vendor="longsleep"
pkgver=0.1.0
pkgrel=6
pkgdesc="SPKAC/PKAC HTML keygen element data decoding for Go"
url="https://github.com/$_vendor/$_pkgname"
arch="noarch"
license="BSD-3-Clause"
depends="go"
subpackages="$pkgname-doc"
options="!check" # no testsuite
source="$pkgname-$pkgver.tar.gz::https://github.com/$_vendor/$_pkgname/archive/$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver

build() {
	return 0
}

package() {
	cd "$builddir"
	mkdir -p "$pkgdir"/usr/share/doc/$_vendor/$pkgname \
		"$pkgdir"/usr/lib/go/src/github.com/$_vendor/$_pkgname
	for file in \
		LICENSE \
		README.md \
		COPYRIGHT \
		AUTHORS \
		; do \
		test -e $file && mv $file "$pkgdir"/usr/share/doc/$_vendor/$pkgname
	done
	mv * "$pkgdir"/usr/lib/go/src/github.com/$_vendor/$_pkgname
}

sha512sums="0c279736f116dc585ae2475cb727915c88b2424efa219a115b33f5c2da2272caa8faab0eee93f8473c749d5dea1a10f1ab32b10f7e17a69bf11380a1b066c99a  go-pkac-0.1.0.tar.gz"
